remus: don't do failover if we don't have a consistent state
authorWen Congyang <wency@cn.fujitsu.com>
Tue, 19 Jan 2016 07:17:37 +0000 (15:17 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 20 Jan 2016 17:08:36 +0000 (17:08 +0000)
commit794347f5e3b5ce5b94a886f107cb04647aaac281
treef0b45c049181b513bfcb45a0de8e87be390c02f6
parentbf05e88ed7342a91cceba050b6c622accb809842
remus: don't do failover if we don't have a consistent state

We will have a consistent state when a CHECKPOINT_END record
is received. After the first CHECKPOINT_END record is received,
we will buffer all records until the next CHECKPOINT_END record
is received. So if the checkpoint() callback returns XGR_CHECKPOINT_FAILOVER,
we only can do failover if ctx->restore.buffer_all_records is
true.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libxc/xc_sr_restore.c